php forum
php mysql forum
php mysql smarty
 
Topic Options
#144544 - 04/11/02 08:42 PM [6.2x] PM Hack that makes sense
wwb95 Offline
Member

Registered: 11/14/01
Posts: 154
This hack was done as a request on the Mod Ideas and Suggestions see:
http://www.ubbdev.com/ubb/ultimatebb.php?ubb=get_topic;f=28;t=000751

Just simply enter the user number or public name in the my_profile and click send a PM
Instead of going into one of the user post and clicking send a PM
Code:
  
**************** in ultimatebb.cgi
***search for 

	exit(0);

}    #end get_pm

*********add after it
if ($ubb eq 'send_PM') {



	if ($in{R1} eq 'number'){

	  $ubb ='private_message';

	  $in{u}=Do8Digit($in{user});

	}

	else

	{

		&RequireCode("$vars_config{CGIPath}/ubb_lib.cgi");

		$in{u}=&getpublicnamee($in{user});

	  	$ubb ='private_message';

	}

}    #end private_message


**************** in ubb_lib.cgi
***search for 
sub Do6Digit {

	return(sprintf ("%.6d", $_[0]));

}



*********add after it
sub getpublicnamee{

 	my $public_names=$_[0];

        my $num;

	my $one;

        my @line;

        @all_member_nums;

        @all_members_list = grep(/d{8}/, &OpenFileAsArray("$vars_config{MembersPath}/memberslist.cgi"));

	my $count=0;

        foreach $one (@all_members_list) {



        @line = split (/|!!|/, $one);



              chomp($line[1]);



              push (@all_member_nums, $line[1]);



	      $count++;

        }



        @this_member;

	my $found=0;

	my @all_members_list2;

	@all_member_nums2;

	@all_member_name;

	my $count2=0;

	if (-e "$vars_config{MembersPath}/publicmemberslist.cgi"){

		@all_members_list2 = grep(/d{8}/, &OpenFileAsArray("$vars_config{MembersPath}/publicmemberslist.cgi"));

        	foreach $one (@all_members_list2) {



       			@line = split (/|!!|/, $one);



              		chomp($line[1]);



              		push (@all_member_nums2, $line[1]);



              		push (@all_member_name, $line[0]);



	      		$count2++;

        	}



	}



        if ($count2 != $count){

		my @public_name_file;

		THIS: foreach $one (@all_member_nums) {





               	 # open profile



               		@this_member = &OpenProfile($one);



               		chomp($this_member[15]);

      			push (@public_name_file, "$this_member[15]|!!|$one");



              		if ($this_member[15] eq ''){

                       		$this_member[15]=$this_member[0];

               		}

               		if  ($this_member[15] eq $public_names){

                		$num=$one;

               		}

		}

		&WriteFileAsArray("$vars_config{MembersPath}/publicmemberslist.cgi",@public_name_file);

		chmod(0777, "$vars_config{MembersPath}/publicmemberslist.cgi");

	}

	else

	{

	       $count=0;

		THIS: foreach $one (@all_member_nums2) {



               		if  ($all_member_name[$count] eq $public_names){

                		$num=$one;

               		}

	                $count++;

		}

	}

	return $num;



}




**************** in public_my_profile.pl
***search for 

<td valign="bottom" align="right">

<font size="1" face="$vars_style{FontFace}">

<a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=ignore_list">$vars_wordlets{ignore_list}</a> | <a href="$vars_config{CGIURL}/ultimatebb.cgi?ubb=buddy_list">$vars_wordlets{buddy_list}</a>

</font>

</td></tr></table>
</center>


*********add after it
<form method="POST" action="ultimatebb.cgi">

  <p align="center">

  <input type="radio" value="name" checked name="R1"><span lang="en-us">Send by public name

    <input type="radio" name="R1" value="number">Send by user number</span>

  <input type="text" name="user" size="20">

  <INPUT TYPE="HIDDEN" NAME="ubb" VALUE="send_PM">

  <input type="submit" value="Send PM" name="B1">

  <p align="center">

</form>

Top
#144545 - 04/11/02 08:55 PM Re: [6.2x] PM Hack that makes sense
wwb95 Offline
Member

Registered: 11/14/01
Posts: 154
One thin if you allow user to edit there public name you have to add this code in ubb_profile.cgi
[code][/code]

Top
#144546 - 04/11/02 10:28 PM Re: [6.2x] PM Hack that makes sense
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Nice work, it looks like an excellent mod smile
_________________________
- Allen wavey
- What Drives You?

Top
#144547 - 04/11/02 10:56 PM Re: [6.2x] PM Hack that makes sense
JonNJapan Offline
Member

Registered: 06/18/01
Posts: 560
YES!! Thank you very much! I love this. smile

I'll have to install it this afternoon.

~Jon

Top
#144548 - 04/11/02 11:33 PM Re: [6.2x] PM Hack that makes sense
Zackary Offline
Member

Registered: 03/01/01
Posts: 652
Loc: West Fargo, ND USA
Hey now that's pretty slick. laugh

I'm definitely going to keep an eye on this and see how it works for folks over the next week, since I'm deep into modifying templates on my board right now and really don't need another distraction. wink

Maybe I'll put it up next weekend. laugh

Nice job! smile

~Z

Top
#144549 - 04/12/02 08:45 AM Re: [6.2x] PM Hack that makes sense
maurice Offline
Member

Registered: 02/15/01
Posts: 230
Works like a charm, Great Job!!!!!

Top
#144550 - 04/12/02 11:36 AM Re: [6.2x] PM Hack that makes sense
elfman2 Offline
Junior Member

Registered: 12/05/01
Posts: 18
Loc: USA
I am having a problem with this hack, all went well, Until I went to my profile and saw this



I installed the hack 2 more times and still get it like the above pic

Any help would be great, as I think this is a great hack

Thanks laugh

Top
#144551 - 04/12/02 11:44 AM Re: [6.2x] PM Hack that makes sense
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Nice hack, but I think it should be BEFORE $TBT. tipsy
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#144552 - 04/12/02 12:05 PM Re: [6.2x] PM Hack that makes sense
elfman2 Offline
Junior Member

Registered: 12/05/01
Posts: 18
Loc: USA
Thanks LK smile

That solved the problem for me laugh

Top
#144553 - 04/15/02 11:26 AM Re: [6.2x] PM Hack that makes sense
Soul Survivor Offline
Member

Registered: 12/30/01
Posts: 82
just in case anyone cares, i successfully put this on 6.1...
_________________________
can't find peace of mind but every corner's got a mcdonalds?!

Top
#144554 - 04/17/02 10:57 AM Re: [6.2x] PM Hack that makes sense
Soul Survivor Offline
Member

Registered: 12/30/01
Posts: 82
FYI, this seems to be case sensitive. If I type in "soul survivor" it doesn't know who I am. . but it knows "Soul Survivor".
_________________________
can't find peace of mind but every corner's got a mcdonalds?!

Top
#144555 - 04/17/02 11:24 AM Re: [6.2x] PM Hack that makes sense
dreamer Offline
Member

Registered: 02/02/01
Posts: 112
I also tried it case sensitive but no matter what I write I always get the message

No member profile found for member number

even if I write in the Public Name cell

Top
#144556 - 04/25/02 04:25 PM Re: [6.2x] PM Hack that makes sense
bulgogs Offline
Junior Member

Registered: 04/25/02
Posts: 3
got the following error (using 6.04f):

Content-type: text/html
Software error:
Undefined subroutine &main::RequireCode called at C:Inetpubwwwrootwww.igoo.comhtdocsubbcgi-binultimatebb.cgi line 485.

For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.
_________________________
igoo.com - An Asian American Destination
Smart.Yellow.Fun

Top
#144557 - 04/25/02 05:13 PM Re: [6.2x] PM Hack that makes sense
freeTV Offline
Member

Registered: 04/25/01
Posts: 224
Try the hack from the link below. It has the SendPM button that works!

http://www.ubbdev.com/ubb/ultimatebb.php?ubb=get_topic;f=33;t=000110

Top
#144558 - 04/25/02 06:49 PM Re: [6.2x] PM Hack that makes sense
Antelope Offline
Junior Member

Registered: 04/21/02
Posts: 5
It works!

Top
#144559 - 08/18/02 07:16 PM Re: [6.2x] PM Hack that makes sense
pringalz Offline
Junior Member

Registered: 08/17/02
Posts: 14
Loc: California
aye i need this but the url is broken frown

Top
#144560 - 09/25/02 06:47 AM Re: [6.2x] PM Hack that makes sense
-Mac- Offline
Junior Member

Registered: 08/23/02
Posts: 22
Loc: UK
I need a username and password to download it?? Could someone post a get a new link for it please?

Top
#144561 - 09/25/02 12:52 PM Re: [6.2x] PM Hack that makes sense
wwb95 Offline
Member

Registered: 11/14/01
Posts: 154
I am trying to upgrade my ubb and I could not find PM.zip
Any way I have tried to get the code

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks